-- GENERATED SPELL FOR [Felweaver Scornn] --


function spell0_5822(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5822', 3000, 1)
end

function spell1_5822(pUnit, Event) --@Summon Voidwalker,Self--
pUnit:FullCastSpellOnTarget(12746,pUnit)
pUnit:RegisterEvent('Sorts_5822', 563, 1)
end

function Sorts_5822(pUnit, Event)
local choix_sorts_5822 = math.random(0, 1)
if choix_sorts_5822 == 0 then
pUnit:RegisterEvent('spell0_5822', 1, 1)
end
if choix_sorts_5822 == 1 then
pUnit:RegisterEvent('spell1_5822', 1, 1)
end
end

function mob5822_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5822', math.random(1500, 3000), 1)
end

function mob5822_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5822_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5822_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5822, 1, 'mob5822_Action')
RegisterUnitEvent(5822, 2, 'mob5822_Leave')
RegisterUnitEvent(5822, 3, 'mob5822_Kill')
RegisterUnitEvent(5822, 4, 'mob5822_Die')
